1. Field of the Invention
The present invention relates to database management systems and, more particularly, to a system and methodology for providing an in-memory database fully integrated in a traditional disk-resident database management system.
2. Background Art
Computers are very powerful tools for storing and providing access to vast amounts of information. Computer databases are a common mechanism for storing information on computer systems while providing easy access to users. A typical database is an organized collection of related information stored as “records” having “fields” of information. As an example, a database of employees may have a record for each employee where each record contains fields designating specifics about the employee, such as name, home address, salary, and the like.
Between the actual physical database itself (i.e., the data actually stored on a storage device) and the users of the system, a database management system or DBMS is typically provided as a software cushion or layer. In essence, the DBMS shields the database user from knowing or even caring about the underlying hardware-level details. Typically, all requests from users for access to the data are processed by the DBMS. For example, information may be added or removed from data files, information retrieved from or updated in such files, and so forth, all without user knowledge of the underlying system implementation. In this manner, the DBMS provides users with a conceptual view of the database that is removed from the hardware level. The general construction and operation of database management systems is well known in the art. See e.g., Date, C., “An Introduction to Database Systems, Seventh Edition”, Part I (especially Chapters 1-4), Addison Wesley, 2000.
In operation, a DBMS frequently needs to retrieve data from or persist data to storage devices such as disks. Unfortunately, access to such storage devices can be somewhat slow. To speed up access to data, databases typically employ a “cache” or “buffer cache” which is a section of relatively faster memory (e.g., RAM) allocated to store recently used data objects. Throughout the remainder of the specification, this faster memory will simply be referred to as “memory,” as distinguished from mass storage devices such as disks. Memory is typically provided on semiconductor or other electrical storage media and is coupled to a CPU (central processing unit) via a fast data bus which enables data maintained in memory to be accessed more rapidly than data stored on disks.
As memory provided on computer systems has a limited size, some method must be employed for managing what content is maintained in cache memory. Conventionally, data storage systems employ some form of a “least recently used-most recently used” (LRU/MRU) protocol to queue data objects in the buffer cache. Basically, such LRU/MRU protocol moves the “most recently used” data object to the head of the queue while simultaneously moving data objects that have not been used one step towards the end of the queue. Thus, infrequently used objects migrate toward the end of the queue, and ultimately are deleted from the buffer cache to make room for new data objects copied from disks (i.e., infrequently used objects are displaced by more recently used objects). In this manner, the most recently used data objects are the only objects stored in the buffer cache at any given time.
Unfortunately, the basic LRU/MRU memory management protocol is subject to a number of limitations. As a result, other approaches providing for greater efficiency in management of data objects in cache have been adopted. For example, U.S. Pat. No. 6,061,763 provides for partitioning computer memory provided in a single cache, symmetric multiprocessor (SMP) system into a plurality of buffer caches, each of which buffer caches is separately addressable and may be configured to retain data objects meeting specified criteria. Although this approach provides considerable performance improvements over the basic LRU/MRU protocol, problems remain in providing fast access to data in database systems.
Among the issues not addressed by current database management system solutions is the fact that these existing solutions are not designed to support the running of an entire database fully in-memory without any on-disk storage and integrated tightly with the database server engine. Some software components, such as SolidDB from IBM™ Corporation (Armonk, N.Y.) or TimesTen from ORACLE™ Corporation (Redwood City, Calif.), are available to provide some level of support of an in-memory database, but these are stand-alone products operating as an add-on to the operations of the database server and are not integrated within the database server engine.
In order to obtain better performance in a database system environment, what is needed is the ability to integrate support for a zero-disk footprint in-memory database in a database server. The solution should provide this support without any other external software components or other operating system support. Ideally, the solution should enable configuration of in-memory databases to provide users and administrators the ability to take advantage of hardware which can support large amounts of main memory with data collections that need high performance access. The present invention provides a solution for these and other needs.